﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.DTO
{
    public class TMaterialSelDto
    {
        /// <summary>
        /// 物料Id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        public string Code { get; set; }

        /// <summary>
        /// 上级器材编码
        /// </summary>
        public string ParentCode { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 型号规格
        /// </summary>
        public string ModelSpec { get; set; }

        /// <summary>
        /// 物料类型Id
        /// </summary>
        public int TypeId { get; set; }
        public string TypeCode { get; set; }
        /// <summary>
        /// 专业名称
        /// </summary>
        public string TypeName { get; set; }

        /// <summary>
        /// 质检状态
        /// </summary>
        public int QualityState { get; set; }

        [NotMapped]
        public string QualityStateName
        {
            get
            {

                if (QualityState == 1)
                {
                    return "新品";
                }
                return "半成品";
            }
        }

        /// <summary>
        /// 基本单位Id
        /// </summary>
        public int? UnitId { get; set; }
        /// <summary>
        /// 基本单位
        /// </summary>
        public string UnitName { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 装备Id
        /// </summary>
        public int? MaterialCategoryId { get; set; }

        /// <summary>
        /// 装备代码
        /// </summary>
        public string MaterialCategoryCode { get; set; }

        /// <summary>
        /// 装备名称
        /// </summary>
        public string MaterialCategoryName { get; set; }

        /// <summary>
        /// 器材分类
        /// </summary>
        public int? MaterialGroupId { get; set; }

        /// <summary>
        /// 实际接收数量：为基本单位的数量
        /// </summary>
        public int? ReceivedQty { get; set; }
        /// <summary>
        /// 期待数量：即订单数量，为基本单位的数量
        /// </summary>
        public int? Qty { get; set; }

        /// <summary>
        /// 单价（暂时弃用）
        /// </summary>
        public decimal? Price { get; set; }

        /// <summary>
        /// 实际单价
        /// </summary>
        public decimal? ReceivePrice { get; set; }

        /// <summary>
        /// 创建人Id
        /// </summary>
        public int? CreateUserId { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateDate { get; set; }
        /// <summary>
        /// 修改用户Id
        /// </summary>
        public int? ModifyUserId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string ModifyUserName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }

        /// <summary>
        /// 库存数量
        /// </summary>
        public decimal? TInventoryQty { get; set; }

        public int TcellId { get; set; }
        /// <summary>
        /// 仓位编码
        /// </summary>
        public string TcellCode { get; set; }
        /// <summary>
        /// 仓位名称
        /// </summary>
        public string TcellName { get; set; }
    }


}
